import React, { Component } from 'react'
import PropTypes from 'prop-types'

export default class Header extends Component {
  static propTypes = {
    placeholder: PropTypes.string.isRequired
  }
  static defaultProps = {
    placeholder: '请输入您的任务名称，按回车键确认'
  }
  render() {
    const { placeholder } = this.props
    return (
      <div>
        <div className="form-group">
          <input
            type="text"
            className="form-control"
            placeholder={placeholder}
          />
        </div>
      </div>
    )
  }
}
